//
//  GoodsCell.m
//  Lianxi2
//
//  Created by lanou on 16/7/4.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "GoodsCell.h"
@interface GoodsCell()
@property (weak, nonatomic) IBOutlet UIImageView *photo;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (nonatomic,strong)NSString *url;


@end



@implementation GoodsCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (IBAction)buyBtnAction:(id)sender {
    
    [self.secendDelegate buyGoosScenesWithUrl:self.url];
    
}

- (void)setCellWithModel:(id)model{
    GoodsModel *mode = model;
    [self.photo sd_setImageWithURL:[NSURL URLWithString:mode.coverimg]];
    self.title.text = mode.title;
    self.url = mode.buyurl;
}

@end
